package com.pfsoft.expression.StaticBlockInitStep;/**
 * 方法执行顺序
 *
 * @author PF
 * Created by dell on 2017/8/21.
 */

import java.util.ArrayList;
import java.util.List;

/**
 * com.pfsoft.expression
 * 方法执行顺序
 * @author PF
 * @create 2017-08-21 8:55
 **/
public class ExecuteStep {

      ExecuteStep(){
        System.out.print("这是构造方法\n");
    }

    private  static List<String> nameList;

    private static void staticMethod()
    {
        System.out.print("这是静态方法");
        nameList=new ArrayList<String>();
        nameList.add("pf");
    }

    public   void instanceMethod()
    {
        System.out.print("这是实例方法\n");
        System.out.print(nameList.size());
    }
    static {
        System.out.print("这是静态代码块\n");
    }
}
